home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / t3_1 / risc_src.lha / risc_sources / xlib / xws7.t < prev    next >
Text File  |  1990-06-01  |  33KB  |  746 lines

  1. (HERALD XWS7 (ENV TSYS (XLIB INTERFACE)))
  2.  
  3. (DEFINE-FOREIGN XREPARENTWINDOW*
  4.                 ("XReparentWindow" (IN REP/C-POINTER)
  5.                                    (IN REP/INTEGER)
  6.                                    (IN REP/INTEGER)
  7.                                    (IN REP/INTEGER)
  8.                                    (IN REP/INTEGER))
  9.                 IGNORE)
  10. (DEFINE (XREPARENTWINDOW DPY W P X Y)
  11.         (LET* ((DPY (CHK-DISPLAYP DPY))
  12.                (W W)
  13.                (P P)
  14.                (X X)
  15.                (Y Y)
  16.                (RETURN-VALUE (BLOCK (XREPARENTWINDOW* DPY W P X Y) '())))
  17.               RETURN-VALUE))
  18. (DEFINE-FOREIGN XCHANGESAVESET*
  19.                 ("XChangeSaveSet" (IN REP/C-POINTER)
  20.                                   (IN REP/INTEGER)
  21.                                   (IN REP/INTEGER))
  22.                 IGNORE)
  23. (DEFINE (XCHANGESAVESET DPY WIN MODE)
  24.         (LET* ((DPY (CHK-DISPLAYP DPY))
  25.                (WIN WIN)
  26.                (MODE MODE)
  27.                (RETURN-VALUE (BLOCK (XCHANGESAVESET* DPY WIN MODE) '())))
  28.               RETURN-VALUE))
  29. (DEFINE-FOREIGN XADDTOSAVESET*
  30.                 ("XAddToSaveSet" (IN REP/C-POINTER) (IN REP/INTEGER))
  31.                 IGNORE)
  32. (DEFINE (XADDTOSAVESET DPY WIN)
  33.         (LET* ((DPY (CHK-DISPLAYP DPY))
  34.                (WIN WIN)
  35.                (RETURN-VALUE (BLOCK (XADDTOSAVESET* DPY WIN) '())))
  36.               RETURN-VALUE))
  37. (DEFINE-FOREIGN XREMOVEFROMSAVESET*
  38.                 ("XRemoveFromSaveSet" (IN REP/C-POINTER) (IN REP/INTEGER))
  39.                 IGNORE)
  40. (DEFINE (XREMOVEFROMSAVESET DPY WIN)
  41.         (LET* ((DPY (CHK-DISPLAYP DPY))
  42.                (WIN WIN)
  43.                (RETURN-VALUE (BLOCK (XREMOVEFROMSAVESET* DPY WIN) '())))
  44.               RETURN-VALUE))
  45. (DEFINE-FOREIGN XINSTALLCOLORMAP*
  46.                 ("XInstallColormap" (IN REP/C-POINTER) (IN REP/INTEGER))
  47.                 IGNORE)
  48. (DEFINE (XINSTALLCOLORMAP DPY CMAP)
  49.         (LET* ((DPY (CHK-DISPLAYP DPY))
  50.                (CMAP CMAP)
  51.                (RETURN-VALUE (BLOCK (XINSTALLCOLORMAP* DPY CMAP) '())))
  52.               RETURN-VALUE))
  53. (DEFINE-FOREIGN XUNINSTALLCOLORMAP*
  54.                 ("XUninstallColormap" (IN REP/C-POINTER) (IN REP/INTEGER))
  55.                 IGNORE)
  56. (DEFINE (XUNINSTALLCOLORMAP DPY CMAP)
  57.         (LET* ((DPY (CHK-DISPLAYP DPY))
  58.                (CMAP CMAP)
  59.                (RETURN-VALUE (BLOCK (XUNINSTALLCOLORMAP* DPY CMAP) '())))
  60.               RETURN-VALUE))
  61. (DEFINE-FOREIGN XLISTINSTALLEDCOLORMAPS*
  62.                 ("XListInstalledColormaps" (IN REP/C-POINTER)
  63.                                            (IN REP/INTEGER)
  64.                                            (IN REP/EXTEND))
  65.                 REP/POINTER)
  66. (DEFINE (XLISTINSTALLEDCOLORMAPS DPY W)
  67.         (LET* ((DPY (CHK-DISPLAYP DPY))
  68.                (W W)
  69.                (NUM (MAKE-BYTEV 4))
  70.                (RETURN-VALUE (CONS 'UNSIGNEDAP
  71.                                    (XLISTINSTALLEDCOLORMAPS* DPY W NUM))))
  72.               (RETURN RETURN-VALUE (MREF-INTEGER NUM 0))))
  73. (DEFINE-FOREIGN XGRABPOINTER*
  74.                 ("XGrabPointer" (IN REP/C-POINTER)
  75.                                 (IN REP/INTEGER)
  76.                                 (IN REP/INTEGER)
  77.                                 (IN REP/INTEGER)
  78.                                 (IN REP/INTEGER)
  79.                                 (IN REP/INTEGER)
  80.                                 (IN REP/INTEGER)
  81.                                 (IN REP/INTEGER)
  82.                                 (IN REP/INTEGER))
  83.                 REP/INTEGER)
  84. (DEFINE (XGRABPOINTER DPY
  85.                       GRAB_WINDOW
  86.                       OWNER_EVENTS
  87.                       EVENT_MASK
  88.                       POINTER_MODE
  89.                       KEYBOARD_MODE
  90.                       CONFINE_TO
  91.                       CURS
  92.                       TIME)
  93.         (LET* ((DPY (CHK-DISPLAYP DPY))
  94.                (GRAB_WINDOW GRAB_WINDOW)
  95.                (OWNER_EVENTS OWNER_EVENTS)
  96.                (EVENT_MASK EVENT_MASK)
  97.                (POINTER_MODE POINTER_MODE)
  98.                (KEYBOARD_MODE KEYBOARD_MODE)
  99.                (CONFINE_TO CONFINE_TO)
  100.                (CURS CURS)
  101.                (TIME TIME)
  102.                (RETURN-VALUE (XGRABPOINTER* DPY
  103.                                             GRAB_WINDOW
  104.                                             OWNER_EVENTS
  105.                                             EVENT_MASK
  106.                                             POINTER_MODE
  107.                                             KEYBOARD_MODE
  108.                                             CONFINE_TO
  109.                                             CURS
  110.                                             TIME)))
  111.               RETURN-VALUE))
  112. (DEFINE-FOREIGN XUNGRABPOINTER*
  113.                 ("XUngrabPointer" (IN REP/C-POINTER) (IN REP/INTEGER))
  114.                 IGNORE)
  115. (DEFINE (XUNGRABPOINTER DPY TIME)
  116.         (LET* ((DPY (CHK-DISPLAYP DPY))
  117.                (TIME TIME)
  118.                (RETURN-VALUE (BLOCK (XUNGRABPOINTER* DPY TIME) '())))
  119.               RETURN-VALUE))
  120. (DEFINE-FOREIGN XCHANGEACTIVEPOINTERGRAB*
  121.                 ("XChangeActivePointerGrab" (IN REP/C-POINTER)
  122.                                             (IN REP/INTEGER)
  123.                                             (IN REP/INTEGER)
  124.                                             (IN REP/INTEGER))
  125.                 IGNORE)
  126. (DEFINE (XCHANGEACTIVEPOINTERGRAB DPY EVENT_MASK CURS TIME)
  127.         (LET* ((DPY (CHK-DISPLAYP DPY))
  128.                (EVENT_MASK EVENT_MASK)
  129.                (CURS CURS)
  130.                (TIME TIME)
  131.                (RETURN-VALUE (BLOCK (XCHANGEACTIVEPOINTERGRAB* DPY
  132.                                                                EVENT_MASK
  133.                                                                CURS
  134.                                                                TIME)
  135.                                     '())))
  136.               RETURN-VALUE))
  137. (DEFINE-FOREIGN XGRABBUTTON*
  138.                 ("XGrabButton" (IN REP/C-POINTER)
  139.                                (IN REP/INTEGER)
  140.                                (IN REP/INTEGER)
  141.                                (IN REP/INTEGER)
  142.                                (IN REP/INTEGER)
  143.                                (IN REP/INTEGER)
  144.                                (IN REP/INTEGER)
  145.                                (IN REP/INTEGER)
  146.                                (IN REP/INTEGER)
  147.                                (IN REP/INTEGER))
  148.                 IGNORE)
  149. (DEFINE (XGRABBUTTON DPY
  150.                      BUTTON
  151.                      MODIFIERS
  152.                      GRAB_WINDOW
  153.                      OWNER_EVENTS
  154.                      EVENT_MASK
  155.                      POINTER_MODE
  156.                      KEYBOARD_MODE
  157.                      CONFINE_TO
  158.                      CURS)
  159.         (LET* ((DPY (CHK-DISPLAYP DPY))
  160.                (BUTTON BUTTON)
  161.                (MODIFIERS MODIFIERS)
  162.                (GRAB_WINDOW GRAB_WINDOW)
  163.                (OWNER_EVENTS OWNER_EVENTS)
  164.                (EVENT_MASK EVENT_MASK)
  165.                (POINTER_MODE POINTER_MODE)
  166.                (KEYBOARD_MODE KEYBOARD_MODE)
  167.                (CONFINE_TO CONFINE_TO)
  168.                (CURS CURS)
  169.                (RETURN-VALUE (BLOCK (XGRABBUTTON* DPY
  170.                                                   BUTTON
  171.                                                   MODIFIERS
  172.                                                   GRAB_WINDOW
  173.                                                   OWNER_EVENTS
  174.                                                   EVENT_MASK
  175.                                                   POINTER_MODE
  176.                                                   KEYBOARD_MODE
  177.                                                   CONFINE_TO
  178.                                                   CURS)
  179.                                     '())))
  180.               RETURN-VALUE))
  181. (DEFINE-FOREIGN XUNGRABBUTTON*
  182.                 ("XUngrabButton" (IN REP/C-POINTER)
  183.                                  (IN REP/INTEGER)
  184.                                  (IN REP/INTEGER)
  185.                                  (IN REP/INTEGER))
  186.                 IGNORE)
  187. (DEFINE (XUNGRABBUTTON DPY BUTTON MODIFIERS GRAB_WINDOW)
  188.         (LET* ((DPY (CHK-DISPLAYP DPY))
  189.                (BUTTON BUTTON)
  190.                (MODIFIERS MODIFIERS)
  191.                (GRAB_WINDOW GRAB_WINDOW)
  192.                (RETURN-VALUE (BLOCK (XUNGRABBUTTON* DPY
  193.                                                     BUTTON
  194.                                                     MODIFIERS
  195.                                                     GRAB_WINDOW)
  196.                                     '())))
  197.               RETURN-VALUE))
  198. (DEFINE-FOREIGN XGRABKEYBOARD*
  199.                 ("XGrabKeyboard" (IN REP/C-POINTER)
  200.                                  (IN REP/INTEGER)
  201.                                  (IN REP/INTEGER)
  202.                                  (IN REP/INTEGER)
  203.                                  (IN REP/INTEGER)
  204.                                  (IN REP/INTEGER))
  205.                 REP/INTEGER)
  206. (DEFINE (XGRABKEYBOARD DPY WINDOW OWNEREVENTS POINTERMODE KEYBOARDMODE TIME)
  207.         (LET* ((DPY (CHK-DISPLAYP DPY))
  208.                (WINDOW WINDOW)
  209.                (OWNEREVENTS OWNEREVENTS)
  210.                (POINTERMODE POINTERMODE)
  211.                (KEYBOARDMODE KEYBOARDMODE)
  212.                (TIME TIME)
  213.                (RETURN-VALUE (XGRABKEYBOARD* DPY
  214.                                              WINDOW
  215.                                              OWNEREVENTS
  216.                                              POINTERMODE
  217.                                              KEYBOARDMODE
  218.                                              TIME)))
  219.               RETURN-VALUE))
  220. (DEFINE-FOREIGN XUNGRABKEYBOARD*
  221.                 ("XUngrabKeyboard" (IN REP/C-POINTER) (IN REP/INTEGER))
  222.                 IGNORE)
  223. (DEFINE (XUNGRABKEYBOARD DPY TIME)
  224.         (LET* ((DPY (CHK-DISPLAYP DPY))
  225.                (TIME TIME)
  226.                (RETURN-VALUE (BLOCK (XUNGRABKEYBOARD* DPY TIME) '())))
  227.               RETURN-VALUE))
  228. (DEFINE-FOREIGN XGRABKEY*
  229.                 ("XGrabKey" (IN REP/C-POINTER)
  230.                             (IN REP/INTEGER)
  231.                             (IN REP/INTEGER)
  232.                             (IN REP/INTEGER)
  233.                             (IN REP/INTEGER)
  234.                             (IN REP/INTEGER)
  235.                             (IN REP/INTEGER))
  236.                 IGNORE)
  237. (DEFINE (XGRABKEY DPY
  238.                   KEY
  239.                   MODIFIERS
  240.                   GRAB_WINDOW
  241.                   OWNER_EVENTS
  242.                   POINTER_MODE
  243.                   KEYBOARD_MODE)
  244.         (LET* ((DPY (CHK-DISPLAYP DPY))
  245.                (KEY KEY)
  246.                (MODIFIERS MODIFIERS)
  247.                (GRAB_WINDOW GRAB_WINDOW)
  248.                (OWNER_EVENTS OWNER_EVENTS)
  249.                (POINTER_MODE POINTER_MODE)
  250.                (KEYBOARD_MODE KEYBOARD_MODE)
  251.                (RETURN-VALUE (BLOCK (XGRABKEY* DPY
  252.                                                KEY
  253.                                                MODIFIERS
  254.                                                GRAB_WINDOW
  255.                                                OWNER_EVENTS
  256.                                                POINTER_MODE
  257.                                                KEYBOARD_MODE)
  258.                                     '())))
  259.               RETURN-VALUE))
  260. (DEFINE-FOREIGN XUNGRABKEY*
  261.                 ("XUngrabKey" (IN REP/C-POINTER)
  262.                               (IN REP/INTEGER)
  263.                               (IN REP/INTEGER)
  264.                               (IN REP/INTEGER))
  265.                 IGNORE)
  266. (DEFINE (XUNGRABKEY DPY KEY MODIFIERS GRAB_WINDOW)
  267.         (LET* ((DPY (CHK-DISPLAYP DPY))
  268.                (KEY KEY)
  269.                (MODIFIERS MODIFIERS)
  270.                (GRAB_WINDOW GRAB_WINDOW)
  271.                (RETURN-VALUE (BLOCK (XUNGRABKEY* DPY KEY MODIFIERS GRAB_WINDOW)
  272.                                     '())))
  273.               RETURN-VALUE))
  274. (DEFINE-FOREIGN XALLOWEVENTS*
  275.                 ("XAllowEvents" (IN REP/C-POINTER)
  276.                                 (IN REP/INTEGER)
  277.                                 (IN REP/INTEGER))
  278.                 IGNORE)
  279. (DEFINE (XALLOWEVENTS DPY MODE TIME)
  280.         (LET* ((DPY (CHK-DISPLAYP DPY))
  281.                (MODE MODE)
  282.                (TIME TIME)
  283.                (RETURN-VALUE (BLOCK (XALLOWEVENTS* DPY MODE TIME) '())))
  284.               RETURN-VALUE))
  285. (DEFINE-FOREIGN XGRABSERVER* ("XGrabServer" (IN REP/C-POINTER)) IGNORE)
  286. (DEFINE (XGRABSERVER DPY)
  287.         (LET* ((DPY (CHK-DISPLAYP DPY))
  288.                (RETURN-VALUE (BLOCK (XGRABSERVER* DPY) '())))
  289.               RETURN-VALUE))
  290. (DEFINE-FOREIGN XUNGRABSERVER* ("XUngrabServer" (IN REP/C-POINTER)) IGNORE)
  291. (DEFINE (XUNGRABSERVER DPY)
  292.         (LET* ((DPY (CHK-DISPLAYP DPY))
  293.                (RETURN-VALUE (BLOCK (XUNGRABSERVER* DPY) '())))
  294.               RETURN-VALUE))
  295. (DEFINE-FOREIGN XWARPPOINTER*
  296.                 ("XWarpPointer" (IN REP/C-POINTER)
  297.                                 (IN REP/INTEGER)
  298.                                 (IN REP/INTEGER)
  299.                                 (IN REP/INTEGER)
  300.                                 (IN REP/INTEGER)
  301.                                 (IN REP/INTEGER)
  302.                                 (IN REP/INTEGER)
  303.                                 (IN REP/INTEGER)
  304.                                 (IN REP/INTEGER))
  305.                 IGNORE)
  306. (DEFINE (XWARPPOINTER DPY
  307.                       SRC_WIN
  308.                       DEST_WIN
  309.                       SRC_X
  310.                       SRC_Y
  311.                       SRC_WIDTH
  312.                       SRC_HEIGHT
  313.                       DEST_X
  314.                       DEST_Y)
  315.         (LET* ((DPY (CHK-DISPLAYP DPY))
  316.                (SRC_WIN SRC_WIN)
  317.                (DEST_WIN DEST_WIN)
  318.                (SRC_X SRC_X)
  319.                (SRC_Y SRC_Y)
  320.                (SRC_WIDTH SRC_WIDTH)
  321.                (SRC_HEIGHT SRC_HEIGHT)
  322.                (DEST_X DEST_X)
  323.                (DEST_Y DEST_Y)
  324.                (RETURN-VALUE (BLOCK (XWARPPOINTER* DPY
  325.                                                    SRC_WIN
  326.                                                    DEST_WIN
  327.                                                    SRC_X
  328.                                                    SRC_Y
  329.                                                    SRC_WIDTH
  330.                                                    SRC_HEIGHT
  331.                                                    DEST_X
  332.                                                    DEST_Y)
  333.                                     '())))
  334.               RETURN-VALUE))
  335. (DEFINE-FOREIGN XSETINPUTFOCUS*
  336.                 ("XSetInputFocus" (IN REP/C-POINTER)
  337.                                   (IN REP/INTEGER)
  338.                                   (IN REP/INTEGER)
  339.                                   (IN REP/INTEGER))
  340.                 IGNORE)
  341. (DEFINE (XSETINPUTFOCUS DPY FOCUS REVERT_TO TIME)
  342.         (LET* ((DPY (CHK-DISPLAYP DPY))
  343.                (FOCUS FOCUS)
  344.                (REVERT_TO REVERT_TO)
  345.                (TIME TIME)
  346.                (RETURN-VALUE (BLOCK (XSETINPUTFOCUS* DPY FOCUS REVERT_TO TIME)
  347.                                     '())))
  348.               RETURN-VALUE))
  349. (DEFINE-FOREIGN XGETINPUTFOCUS*
  350.                 ("XGetInputFocus" (IN REP/C-POINTER)
  351.                                   (IN REP/EXTEND)
  352.                                   (IN REP/EXTEND))
  353.                 IGNORE)
  354. (DEFINE (XGETINPUTFOCUS DPY)
  355.         (LET* ((DPY (CHK-DISPLAYP DPY))
  356.                (FOCUS (MAKE-BYTEV 4))
  357.                (REVERT_TO (MAKE-BYTEV 4))
  358.                (RETURN-VALUE (BLOCK (XGETINPUTFOCUS* DPY FOCUS REVERT_TO)
  359.                                     '())))
  360.               (RETURN (MREF-INTEGER FOCUS 0) (MREF-INTEGER REVERT_TO 0))))
  361. (DEFINE-FOREIGN XSETCLOSEDOWNMODE*
  362.                 ("XSetCloseDownMode" (IN REP/C-POINTER) (IN REP/INTEGER))
  363.                 IGNORE)
  364. (DEFINE (XSETCLOSEDOWNMODE DPY MODE)
  365.         (LET* ((DPY (CHK-DISPLAYP DPY))
  366.                (MODE MODE)
  367.                (RETURN-VALUE (BLOCK (XSETCLOSEDOWNMODE* DPY MODE) '())))
  368.               RETURN-VALUE))
  369. (DEFINE-FOREIGN XKILLCLIENT*
  370.                 ("XKillClient" (IN REP/C-POINTER) (IN REP/INTEGER))
  371.                 IGNORE)
  372. (DEFINE (XKILLCLIENT DPY RESOURCE)
  373.         (LET* ((DPY (CHK-DISPLAYP DPY))
  374.                (RESOURCE RESOURCE)
  375.                (RETURN-VALUE (BLOCK (XKILLCLIENT* DPY RESOURCE) '())))
  376.               RETURN-VALUE))
  377. (DEFINE-FOREIGN XCHANGEKEYBOARDCONTROL*
  378.                 ("XChangeKeyboardControl" (IN REP/C-POINTER)
  379.                                           (IN REP/INTEGER)
  380.                                           (IN REP/C-POINTER))
  381.                 IGNORE)
  382. (DEFINE (XCHANGEKEYBOARDCONTROL DPY MASK VALUE_LIST)
  383.         (LET* ((DPY (CHK-DISPLAYP DPY))
  384.                (MASK MASK)
  385.                (VALUE_LIST (CHK-XKEYBOARDCONTROLP VALUE_LIST))
  386.                (RETURN-VALUE (BLOCK (XCHANGEKEYBOARDCONTROL* DPY
  387.                                                              MASK
  388.                                                              VALUE_LIST)
  389.                                     '())))
  390.               RETURN-VALUE))
  391. (DEFINE-FOREIGN XGETKEYBOARDCONTROL*
  392.                 ("XGetKeyboardControl" (IN REP/C-POINTER) (IN REP/EXTEND))
  393.                 IGNORE)
  394. (DEFINE (XGETKEYBOARDCONTROL DPY)
  395.         (LET* ((DPY (CHK-DISPLAYP DPY))
  396.                (STATE (MAKE-BYTEV 56))
  397.                (RETURN-VALUE (BLOCK (XGETKEYBOARDCONTROL* DPY STATE) '())))
  398.               (CONS 'XKEYBOARDSTATEP STATE)))
  399. (DEFINE-FOREIGN XAUTOREPEATON* ("XAutoRepeatOn" (IN REP/C-POINTER)) IGNORE)
  400. (DEFINE (XAUTOREPEATON DPY)
  401.         (LET* ((DPY (CHK-DISPLAYP DPY))
  402.                (RETURN-VALUE (BLOCK (XAUTOREPEATON* DPY) '())))
  403.               RETURN-VALUE))
  404. (DEFINE-FOREIGN XAUTOREPEATOFF* ("XAutoRepeatOff" (IN REP/C-POINTER)) IGNORE)
  405. (DEFINE (XAUTOREPEATOFF DPY)
  406.         (LET* ((DPY (CHK-DISPLAYP DPY))
  407.                (RETURN-VALUE (BLOCK (XAUTOREPEATOFF* DPY) '())))
  408.               RETURN-VALUE))
  409. (DEFINE-FOREIGN XBELL* ("XBell" (IN REP/C-POINTER) (IN REP/INTEGER)) IGNORE)
  410. (DEFINE (XBELL DPY PERCENT)
  411.         (LET* ((DPY (CHK-DISPLAYP DPY))
  412.                (PERCENT PERCENT)
  413.                (RETURN-VALUE (BLOCK (XBELL* DPY PERCENT) '())))
  414.               RETURN-VALUE))
  415. (DEFINE-FOREIGN XQUERYKEYMAP*
  416.                 ("XQueryKeymap" (IN REP/C-POINTER) (IN REP/EXTEND))
  417.                 IGNORE)
  418. (DEFINE (XQUERYKEYMAP DPY)
  419.         (LET* ((DPY (CHK-DISPLAYP DPY))
  420.                (KEYS (MAKE-BYTEV 32))
  421.                (RETURN-VALUE (BLOCK (XQUERYKEYMAP* DPY KEYS) '())))
  422.               (CONS 'XQKEYMAPP KEYS)))
  423. (DEFINE-FOREIGN XSETPOINTERMAPPING*
  424.                 ("XSetPointerMapping" (IN REP/C-POINTER)
  425.                                       (IN REP/C-POINTER)
  426.                                       (IN REP/INTEGER))
  427.                 REP/INTEGER)
  428. (DEFINE (XSETPOINTERMAPPING DPY MAP NMAPS)
  429.         (LET* ((DPY (CHK-DISPLAYP DPY))
  430.                (MAP (CHK-CHARAP MAP))
  431.                (NMAPS NMAPS)
  432.                (RETURN-VALUE (XSETPOINTERMAPPING* DPY MAP NMAPS)))
  433.               RETURN-VALUE))
  434. (DEFINE-FOREIGN XGETPOINTERMAPPING*
  435.                 ("XGetPointerMapping" (IN REP/C-POINTER)
  436.                                       (IN REP/C-POINTER)
  437.                                       (IN REP/INTEGER))
  438.                 REP/INTEGER)
  439. (DEFINE (XGETPOINTERMAPPING DPY MAP NMAPS)
  440.         (LET* ((DPY (CHK-DISPLAYP DPY))
  441.                (MAP (CHK-CHARAP MAP))
  442.                (NMAPS NMAPS)
  443.                (RETURN-VALUE (XGETPOINTERMAPPING* DPY MAP NMAPS)))
  444.               RETURN-VALUE))
  445. (DEFINE-FOREIGN XCHANGEPOINTERCONTROL*
  446.                 ("XChangePointerControl" (IN REP/C-POINTER)
  447.                                          (IN REP/INTEGER)
  448.                                          (IN REP/INTEGER)
  449.                                          (IN REP/INTEGER)
  450.                                          (IN REP/INTEGER)
  451.                                          (IN REP/INTEGER))
  452.                 IGNORE)
  453. (DEFINE (XCHANGEPOINTERCONTROL DPY
  454.                                DO_ACC
  455.                                DO_THRESH
  456.                                ACC_NUMERATOR
  457.                                ACC_DENOMINATOR
  458.                                THRESHOLD)
  459.         (LET* ((DPY (CHK-DISPLAYP DPY))
  460.                (DO_ACC DO_ACC)
  461.                (DO_THRESH DO_THRESH)
  462.                (ACC_NUMERATOR ACC_NUMERATOR)
  463.                (ACC_DENOMINATOR ACC_DENOMINATOR)
  464.                (THRESHOLD THRESHOLD)
  465.                (RETURN-VALUE (BLOCK (XCHANGEPOINTERCONTROL* DPY
  466.                                                             DO_ACC
  467.                                                             DO_THRESH
  468.                                                             ACC_NUMERATOR
  469.                                                             ACC_DENOMINATOR
  470.                                                             THRESHOLD)
  471.                                     '())))
  472.               RETURN-VALUE))
  473. (DEFINE-FOREIGN XGETPOINTERCONTROL*
  474.                 ("XGetPointerControl" (IN REP/C-POINTER)
  475.                                       (IN REP/EXTEND)
  476.                                       (IN REP/EXTEND)
  477.                                       (IN REP/EXTEND))
  478.                 IGNORE)
  479. (DEFINE (XGETPOINTERCONTROL DPY)
  480.         (LET* ((DPY (CHK-DISPLAYP DPY))
  481.                (ACCEL_NUMER (MAKE-BYTEV 4))
  482.                (ACCEL_DENOM (MAKE-BYTEV 4))
  483.                (THRESHOLD (MAKE-BYTEV 4))
  484.                (RETURN-VALUE (BLOCK (XGETPOINTERCONTROL* DPY
  485.                                                          ACCEL_NUMER
  486.                                                          ACCEL_DENOM
  487.                                                          THRESHOLD)
  488.                                     '())))
  489.               (RETURN (MREF-INTEGER ACCEL_NUMER 0)
  490.                       (MREF-INTEGER ACCEL_DENOM 0)
  491.                       (MREF-INTEGER THRESHOLD 0))))
  492. (DEFINE-FOREIGN XDISPLAYKEYCODES*
  493.                 ("XDisplayKeycodes" (IN REP/C-POINTER)
  494.                                     (IN REP/EXTEND)
  495.                                     (IN REP/EXTEND))
  496.                 IGNORE)
  497. (DEFINE (XDISPLAYKEYCODES DPY)
  498.         (LET* ((DPY (CHK-DISPLAYP DPY))
  499.                (MIN_KEYCODE_RETURN (MAKE-BYTEV 4))
  500.                (MAX_KEYCODE_RETURN (MAKE-BYTEV 4))
  501.                (RETURN-VALUE (BLOCK (XDISPLAYKEYCODES* DPY
  502.                                                        MIN_KEYCODE_RETURN
  503.                                                        MAX_KEYCODE_RETURN)
  504.                                     '())))
  505.               (RETURN (MREF-INTEGER MIN_KEYCODE_RETURN 0)
  506.                       (MREF-INTEGER MAX_KEYCODE_RETURN 0))))
  507. (DEFINE-FOREIGN XGETKEYBOARDMAPPING*
  508.                 ("XGetKeyboardMapping" (IN REP/C-POINTER)
  509.                                        (IN REP/CHAR)
  510.                                        (IN REP/INTEGER)
  511.                                        (IN REP/EXTEND))
  512.                 REP/POINTER)
  513. (DEFINE (XGETKEYBOARDMAPPING DPY FIRST_KEYCODE COUNT)
  514.         (LET* ((DPY (CHK-DISPLAYP DPY))
  515.                (FIRST_KEYCODE FIRST_KEYCODE)
  516.                (COUNT COUNT)
  517.                (KEYSYMS_PER_KEYCODE (MAKE-BYTEV 4))
  518.                (RETURN-VALUE (CONS 'UNSIGNEDAP
  519.                                    (XGETKEYBOARDMAPPING* DPY
  520.                                                          FIRST_KEYCODE
  521.                                                          COUNT
  522.                                                          KEYSYMS_PER_KEYCODE))))
  523.               (RETURN RETURN-VALUE (MREF-INTEGER KEYSYMS_PER_KEYCODE 0))))
  524. (DEFINE-FOREIGN XCHANGEKEYBOARDMAPPING*
  525.                 ("XChangeKeyboardMapping" (IN REP/C-POINTER)
  526.                                           (IN REP/INTEGER)
  527.                                           (IN REP/INTEGER)
  528.                                           (IN REP/C-POINTER)
  529.                                           (IN REP/INTEGER))
  530.                 IGNORE)
  531. (DEFINE (XCHANGEKEYBOARDMAPPING DPY
  532.                                 FIRST_KEYCODE
  533.                                 KEYSYMS_PER_KEYCODE
  534.                                 KEYSYMS
  535.                                 NKEYCODES)
  536.         (LET* ((DPY (CHK-DISPLAYP DPY))
  537.                (FIRST_KEYCODE FIRST_KEYCODE)
  538.                (KEYSYMS_PER_KEYCODE KEYSYMS_PER_KEYCODE)
  539.                (KEYSYMS (CHK-UNSIGNEDAP KEYSYMS))
  540.                (NKEYCODES NKEYCODES)
  541.                (RETURN-VALUE (BLOCK (XCHANGEKEYBOARDMAPPING* DPY
  542.                                                              FIRST_KEYCODE
  543.                                                              KEYSYMS_PER_KEYCODE
  544.                                                              KEYSYMS
  545.                                                              NKEYCODES)
  546.                                     '())))
  547.               RETURN-VALUE))
  548. (DEFINE-FOREIGN XNEWMODIFIERMAP*
  549.                 ("XNewModifiermap" (IN REP/INTEGER))
  550.                 REP/POINTER)
  551. (DEFINE (XNEWMODIFIERMAP KEYSPERMODIFIER)
  552.         (LET* ((KEYSPERMODIFIER KEYSPERMODIFIER)
  553.                (RETURN-VALUE (CONS 'XMODIFIERKEYMAPP
  554.                                    (XNEWMODIFIERMAP* KEYSPERMODIFIER))))
  555.               RETURN-VALUE))
  556. (DEFINE-FOREIGN XINSERTMODIFIERMAPENTRY*
  557.                 ("XInsertModifiermapEntry" (IN REP/C-POINTER)
  558.                                            (IN REP/CHAR)
  559.                                            (IN REP/INTEGER))
  560.                 REP/POINTER)
  561. (DEFINE (XINSERTMODIFIERMAPENTRY MAP KEYSYM MODIFIER)
  562.         (LET* ((MAP (CHK-XMODIFIERKEYMAPP MAP))
  563.                (KEYSYM KEYSYM)
  564.                (MODIFIER MODIFIER)
  565.                (RETURN-VALUE (CONS 'XMODIFIERKEYMAPP
  566.                                    (XINSERTMODIFIERMAPENTRY* MAP
  567.                                                              KEYSYM
  568.                                                              MODIFIER))))
  569.               RETURN-VALUE))
  570. (DEFINE-FOREIGN XDELETEMODIFIERMAPENTRY*
  571.                 ("XDeleteModifiermapEntry" (IN REP/C-POINTER)
  572.                                            (IN REP/CHAR)
  573.                                            (IN REP/INTEGER))
  574.                 REP/POINTER)
  575. (DEFINE (XDELETEMODIFIERMAPENTRY MAP KEYSYM MODIFIER)
  576.         (LET* ((MAP (CHK-XMODIFIERKEYMAPP MAP))
  577.                (KEYSYM KEYSYM)
  578.                (MODIFIER MODIFIER)
  579.                (RETURN-VALUE (CONS 'XMODIFIERKEYMAPP
  580.                                    (XDELETEMODIFIERMAPENTRY* MAP
  581.                                                              KEYSYM
  582.                                                              MODIFIER))))
  583.               RETURN-VALUE))
  584. (DEFINE-FOREIGN XFREEMODIFIERMAP*
  585.                 ("XFreeModifiermap" (IN REP/C-POINTER))
  586.                 IGNORE)
  587. (DEFINE (XFREEMODIFIERMAP MAP)
  588.         (LET* ((MAP (CHK-XMODIFIERKEYMAPP MAP))
  589.                (RETURN-VALUE (BLOCK (XFREEMODIFIERMAP* MAP) '())))
  590.               RETURN-VALUE))
  591. (DEFINE-FOREIGN XSETMODIFIERMAPPING*
  592.                 ("XSetModifierMapping" (IN REP/C-POINTER) (IN REP/C-POINTER))
  593.                 REP/INTEGER)
  594. (DEFINE (XSETMODIFIERMAPPING DPY MODIFIER_MAP)
  595.         (LET* ((DPY (CHK-DISPLAYP DPY))
  596.                (MODIFIER_MAP (CHK-XMODIFIERKEYMAPP MODIFIER_MAP))
  597.                (RETURN-VALUE (XSETMODIFIERMAPPING* DPY MODIFIER_MAP)))
  598.               RETURN-VALUE))
  599. (DEFINE-FOREIGN XGETMODIFIERMAPPING*
  600.                 ("XGetModifierMapping" (IN REP/C-POINTER))
  601.                 REP/POINTER)
  602. (DEFINE (XGETMODIFIERMAPPING DPY)
  603.         (LET* ((DPY (CHK-DISPLAYP DPY))
  604.                (RETURN-VALUE (CONS 'XMODIFIERKEYMAPP
  605.                                    (XGETMODIFIERMAPPING* DPY))))
  606.               RETURN-VALUE))
  607. (DEFINE-FOREIGN XSETSCREENSAVER*
  608.                 ("XSetScreenSaver" (IN REP/C-POINTER)
  609.                                    (IN REP/INTEGER)
  610.                                    (IN REP/INTEGER)
  611.                                    (IN REP/INTEGER)
  612.                                    (IN REP/INTEGER))
  613.                 IGNORE)
  614. (DEFINE (XSETSCREENSAVER DPY TIMEOUT INTERVAL PREFER_BLANK ALLOW_EXP)
  615.         (LET* ((DPY (CHK-DISPLAYP DPY))
  616.                (TIMEOUT TIMEOUT)
  617.                (INTERVAL INTERVAL)
  618.                (PREFER_BLANK PREFER_BLANK)
  619.                (ALLOW_EXP ALLOW_EXP)
  620.                (RETURN-VALUE (BLOCK (XSETSCREENSAVER* DPY
  621.                                                       TIMEOUT
  622.                                                       INTERVAL
  623.                                                       PREFER_BLANK
  624.                                                       ALLOW_EXP)
  625.                                     '())))
  626.               RETURN-VALUE))
  627. (DEFINE-FOREIGN XFORCESCREENSAVER*
  628.                 ("XForceScreenSaver" (IN REP/C-POINTER) (IN REP/INTEGER))
  629.                 IGNORE)
  630. (DEFINE (XFORCESCREENSAVER DPY MODE)
  631.         (LET* ((DPY (CHK-DISPLAYP DPY))
  632.                (MODE MODE)
  633.                (RETURN-VALUE (BLOCK (XFORCESCREENSAVER* DPY MODE) '())))
  634.               RETURN-VALUE))
  635. (DEFINE-FOREIGN XACTIVATESCREENSAVER*
  636.                 ("XActivateScreenSaver" (IN REP/C-POINTER))
  637.                 IGNORE)
  638. (DEFINE (XACTIVATESCREENSAVER DPY)
  639.         (LET* ((DPY (CHK-DISPLAYP DPY))
  640.                (RETURN-VALUE (BLOCK (XACTIVATESCREENSAVER* DPY) '())))
  641.               RETURN-VALUE))
  642. (DEFINE-FOREIGN XRESETSCREENSAVER*
  643.                 ("XResetScreenSaver" (IN REP/C-POINTER))
  644.                 IGNORE)
  645. (DEFINE (XRESETSCREENSAVER DPY)
  646.         (LET* ((DPY (CHK-DISPLAYP DPY))
  647.                (RETURN-VALUE (BLOCK (XRESETSCREENSAVER* DPY) '())))
  648.               RETURN-VALUE))
  649. (DEFINE-FOREIGN XGETSCREENSAVER*
  650.                 ("XGetScreenSaver" (IN REP/C-POINTER)
  651.                                    (IN REP/EXTEND)
  652.                                    (IN REP/EXTEND)
  653.                                    (IN REP/EXTEND)
  654.                                    (IN REP/EXTEND))
  655.                 IGNORE)
  656. (DEFINE (XGETSCREENSAVER DPY)
  657.         (LET* ((DPY (CHK-DISPLAYP DPY))
  658.                (TIMEOUT (MAKE-BYTEV 4))
  659.                (INTERVAL (MAKE-BYTEV 4))
  660.                (PREFER_BLANKING (MAKE-BYTEV 4))
  661.                (ALLOW_EXP (MAKE-BYTEV 4))
  662.                (RETURN-VALUE (BLOCK (XGETSCREENSAVER* DPY
  663.                                                       TIMEOUT
  664.                                                       INTERVAL
  665.                                                       PREFER_BLANKING
  666.                                                       ALLOW_EXP)
  667.                                     '())))
  668.               (RETURN (MREF-INTEGER TIMEOUT 0)
  669.                       (MREF-INTEGER INTERVAL 0)
  670.                       (MREF-INTEGER PREFER_BLANKING 0)
  671.                       (MREF-INTEGER ALLOW_EXP 0))))
  672. (DEFINE-FOREIGN XADDHOST*
  673.                 ("XAddHost" (IN REP/C-POINTER) (IN REP/C-POINTER))
  674.                 IGNORE)
  675. (DEFINE (XADDHOST DPY HOST)
  676.         (LET* ((DPY (CHK-DISPLAYP DPY))
  677.                (HOST (CHK-XHOSTADDRESSP HOST))
  678.                (RETURN-VALUE (BLOCK (XADDHOST* DPY HOST) '())))
  679.               RETURN-VALUE))
  680. (DEFINE-FOREIGN XADDHOSTS*
  681.                 ("XAddHosts" (IN REP/C-POINTER)
  682.                              (IN REP/C-POINTER)
  683.                              (IN REP/INTEGER))
  684.                 IGNORE)
  685. (DEFINE (XADDHOSTS DPY HOSTS N)
  686.         (LET* ((DPY (CHK-DISPLAYP DPY))
  687.                (HOSTS (CHK-XHOSTADDRESSAP HOSTS))
  688.                (N N)
  689.                (RETURN-VALUE (BLOCK (XADDHOSTS* DPY HOSTS N) '())))
  690.               RETURN-VALUE))
  691. (DEFINE-FOREIGN XLISTHOSTS*
  692.                 ("XListHosts" (IN REP/C-POINTER)
  693.                               (IN REP/EXTEND)
  694.                               (IN REP/EXTEND))
  695.                 REP/POINTER)
  696. (DEFINE (XLISTHOSTS DPY)
  697.         (LET* ((DPY (CHK-DISPLAYP DPY))
  698.                (NHOSTS (MAKE-BYTEV 4))
  699.                (ENABLED (MAKE-BYTEV 4))
  700.                (RETURN-VALUE (CONS 'XHOSTADDRESSAP
  701.                                    (XLISTHOSTS* DPY NHOSTS ENABLED))))
  702.               (RETURN RETURN-VALUE
  703.                       (MREF-INTEGER NHOSTS 0)
  704.                       (MREF-INTEGER ENABLED 0))))
  705. (DEFINE-FOREIGN XREMOVEHOST*
  706.                 ("XRemoveHost" (IN REP/C-POINTER) (IN REP/C-POINTER))
  707.                 IGNORE)
  708. (DEFINE (XREMOVEHOST DPY HOST)
  709.         (LET* ((DPY (CHK-DISPLAYP DPY))
  710.                (HOST (CHK-XHOSTADDRESSP HOST))
  711.                (RETURN-VALUE (BLOCK (XREMOVEHOST* DPY HOST) '())))
  712.               RETURN-VALUE))
  713. (DEFINE-FOREIGN XREMOVEHOSTS*
  714.                 ("XRemoveHosts" (IN REP/C-POINTER)
  715.                                 (IN REP/C-POINTER)
  716.                                 (IN REP/INTEGER))
  717.                 IGNORE)
  718. (DEFINE (XREMOVEHOSTS DPY HOSTS N)
  719.         (LET* ((DPY (CHK-DISPLAYP DPY))
  720.                (HOSTS (CHK-XHOSTADDRESSAP HOSTS))
  721.                (N N)
  722.                (RETURN-VALUE (BLOCK (XREMOVEHOSTS* DPY HOSTS N) '())))
  723.               RETURN-VALUE))
  724. (DEFINE-FOREIGN XSETACCESSCONTROL*
  725.                 ("XSetAccessControl" (IN REP/C-POINTER) (IN REP/INTEGER))
  726.                 IGNORE)
  727. (DEFINE (XSETACCESSCONTROL DPY MODE)
  728.         (LET* ((DPY (CHK-DISPLAYP DPY))
  729.                (MODE MODE)
  730.                (RETURN-VALUE (BLOCK (XSETACCESSCONTROL* DPY MODE) '())))
  731.               RETURN-VALUE))
  732. (DEFINE-FOREIGN XENABLEACCESSCONTROL*
  733.                 ("XEnableAccessControl" (IN REP/C-POINTER))
  734.                 IGNORE)
  735. (DEFINE (XENABLEACCESSCONTROL DPY)
  736.         (LET* ((DPY (CHK-DISPLAYP DPY))
  737.                (RETURN-VALUE (BLOCK (XENABLEACCESSCONTROL* DPY) '())))
  738.               RETURN-VALUE))
  739. (DEFINE-FOREIGN XDISABLEACCESSCONTROL*
  740.                 ("XDisableAccessControl" (IN REP/C-POINTER))
  741.                 IGNORE)
  742. (DEFINE (XDISABLEACCESSCONTROL DPY)
  743.         (LET* ((DPY (CHK-DISPLAYP DPY))
  744.                (RETURN-VALUE (BLOCK (XDISABLEACCESSCONTROL* DPY) '())))
  745.               RETURN-VALUE))
  746.